﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Mozhi.Abp.Core.Extensions
{
    public static class ListExtension
    {
        public static List<T> Join<T>(this List<List<T>> values)
        {
            var result = new List<T>();

            if (values == null || values.Count == 0)
                return result;

            values.ForEach(x =>
            {
                if (x != null && x.Count > 0)
                    result.AddRange(x);
            });

            return result;
        }
    }
}
